package model

import (
	"sync"
)

var (
	globalAccessToken sync.Map
)

func Init() {
	// rankCacheInstance = &RankCache{
	// 	cache: make(map[string][]VoteDate),
	// }
	// rankCacheInstance.LoadFromDatabase()

	// keys, err := utils.LoadKeys("./conf/keys.txt")
	// if err != nil {
	// 	log.Println("读取 keys.txt 文件失败:", err)
	// }
	// for _, v := range keys {
	// 	go refreshToken(v[0], v[2])
	// }
}


func GetAccessToken(appid string) string {
	if token, ok := globalAccessToken.Load(appid); ok {
		return token.(string)
	}
	return ""
}
